<%@ include file="/WEB-INF/views/taglib.jsp" %>
<h3>System Code Type Form</h3>	
	<form:form id="form" method="post" modelAttribute="systemCodeType"  cssClass="simpleForm">
		<form:hidden path="systemCodeTypeId" />
		
	 	<div class="clear" style="height:1px">&nbsp;</div>
		<jsp:include page="/WEB-INF/views/message.jsp"></jsp:include>
	  	<fieldset>
	  		<legend>System Code Type</legend>
	  		
	  		<aims:column cssErrorClass="error" path="systemCodeTypeCode" >
	  		<form:label path="systemCodeTypeCode">
	  			System Code  * 
	 		</form:label>
	  		<form:input path="systemCodeTypeCode" /> <form:errors path="systemCodeTypeCode"  cssClass="errorSimple" /> 
			</aims:column>
			
			<aims:column cssErrorClass="error" path="systemCodeTypeDescription" >
	  		<form:label path="systemCodeTypeDescription">
	  			Description  * 
	 		</form:label>
	  		<form:input path="systemCodeTypeDescription" /> <form:errors path="systemCodeTypeDescription"  cssClass="errorSimple" /> 
			</aims:column>
			
			<aims:column cssErrorClass="error" path="systemCodeTypeValue" >
	  		<form:label path="systemCodeTypeValue">
	  			System Code Value  
	 		</form:label>
	  		<form:input path="systemCodeTypeValue" /> <form:errors path="systemCodeTypeValue"  cssClass="errorSimple" /> 
			</aims:column>
			
			<aims:column cssErrorClass="error" path="accessDepartment" >
	  		<form:label path="accessDepartment">
	  			Access Department 
	 		</form:label>
	  		<c:choose>
	 			<c:when test="${currentSystemUser.department!=null}">
	 				${currentSystemUser.department.departmentName}
	 				<form:hidden path="accessDepartment.departmentId" />
	 			</c:when>
	 			<c:otherwise>
	 				<form:select id="departmentId" path="accessDepartment.departmentId">
			 			<form:option value=""></form:option>
			 			<form:options items="${globalDepartment}" itemValue="departmentId" itemLabel="departmentName" />
			 		</form:select> <form:errors path="accessDepartment"  cssClass="errorSimple" />	
	 			</c:otherwise>
	 		</c:choose>  
			</aims:column>
			
			<aims:column cssErrorClass="error" path="active" >
	  		<form:label path="active">
	  			Active *  
	 		</form:label>
	  		<form:select path="active">
	  		<form:options items="${globalActiveMap}" />	
	  		</form:select>
			 <form:errors path="active"  cssClass="errorSimple" /> 
			</aims:column>
			
			<aims:column cssErrorClass="error" path="multiple" >
	  		<form:label path="multiple">
	  			Multiple Values  
	 		</form:label>
	  		<form:select path="multiple">
	  		<form:options items="${globalYesNoMap}" />	
	  		</form:select>
			 <form:errors path="multiple"  cssClass="errorSimple" /> 
			</aims:column>
			</fieldset>
	  	
      <div class="action">
	  	<c:choose>
	  		<c:when test="${systemCodeType.systemCodeTypeId==null}">
	  			<button type="submit" class="button positive">
	  			Save
	  			</button>
	  			<a href="<c:url value="/systemCode/search" />" class="button">Back</a>
	  		</c:when>
	  		<c:when test="${systemCodeType.systemCodeTypeId!=null}">
  				<button type="submit"  class="button positive">
  				Update</button>
  				<c:if test="${systemCodeType.multiple}">
  				<a href="<c:url value="/systemCode/updateValue/${systemCodeType.systemCodeTypeId}" />" class="button">Update System Code Value</a>
  				</c:if>
  				<a href="<c:url value="/systemCode/search" />" class="button">Back</a>
	  		</c:when>
	  	</c:choose>
	 </div>	
	</form:form>
	<script type="text/javascript">
		$(document).ready(function() {
			
		});
	</script>